import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import Select from '@feidao/widgets/fd-w000018';

export default async function a005(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const v = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="select-id"]').value;
	if (!v) {
		alert('请输入要设置的值');
	} else {
		const s = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000018-001"]');
		s.set_selected(v.split(','));
	}
	fd.data.node.querySelector<HTMLTextAreaElement>('[data-feidao-id="fd-w000018-005"]').innerHTML = `const v = fd.data.node.querySelector<HTMLInputElement>('data-feidao-id="select-id"').value;
if (!v) {
	alert('请输入要设置的值');
} else {
	const s = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000018-001"]');
	s.set_selected(v.split(','));
}`;
}
